package com.company.project.service.impl;

import com.company.project.dao.ThesisAssessmentMapper;
import com.company.project.model.ThesisAssessment;
import com.company.project.service.ThesisAssessmentService;
import com.company.project.core.AbstractService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * Created by CodeGenerator on 2018/10/08.
 */
@Service
@Transactional
public class ThesisAssessmentServiceImpl extends AbstractService<ThesisAssessment> implements ThesisAssessmentService {
    @Resource
    private ThesisAssessmentMapper thesisAssessmentMapper;

    //添加论评估
    @Override
    public Integer addThesisAssessmen(ThesisAssessment thesisAssessment) {
        Integer tn =thesisAssessmentMapper.insertThesisAssessment(thesisAssessment);
        if(tn > 0 && tn!=null){
            return tn;
        }
        return 0;
    }

    @Override
    public ThesisAssessment getThesisAssessmentById(Integer id) {
        return thesisAssessmentMapper.selectById(id);
    }

    @Override
    public List<Map<Object, Object>> selectAssess(Integer id) {
        return thesisAssessmentMapper.selectAssess(id);
    }
}
